home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
v9n17.arc
/
SHFTLOCK.SCR
< prev
next >
Wrap
Text File
|
1990-09-12
|
2KB
|
50 lines
NSHFTLOCK.COM
A100
JMP 13C ; JUMP TO INSTALLATION
NOP
NOP ; STORAGE SPACE FOR
NOP ; OLD KEYBOARD VECTOR
NOP
STI ; INTERRUPTS ON
PUSH AX
MOV AH,2 ; GET SHIFT STATUS
INT 16 ; FROM BIOS
TEST AL,3 ; IS EITHER SHIFT PRESSED?
JZ 114 ; NO, EXIT TO BIOS
TEST AL,40 ; IS CAPSLOCK ALREADY ON?
JNZ 11A ; YES, DO OUR ROUTINE
POP AX ; CLEAN UP STACK AND
CS: ; EXIT TO BIOS ROUTINE
JMP FAR [102]
PUSH DS ; SAVE CALLER'S DATA SEG
MOV AX,40 ; ADDRESS BIOS DATA AREA
MOV DS,AX
AND BYTE PTR [17],BF ; MASK OFF CAPSLOCK BIT
POP DS
POP AX
PUSHF ; LET BIOS PROCESS
CS: ; THIS KEYSTROKE
CALL FAR [102]
PUSH AX ; WHEN IT'S DONE...
PUSH DS
MOV AX,40 ; GO TO BIOS DATA AREA
MOV DS,AX
OR BYTE PTR [17],40 ; MASK CAPSLOCK ON AGAIN
POP DS ; CLEAN UP STACK
POP AX
IRET ; AND EXIT (END OF RAM-RESIDENT CODE)
MOV AX,3509 ; INSTALLATION: GET OLD
INT 21 ; KEYB VECTOR THROUGH DOS
MOV [102],BX ; SAVE OFFSET LOCALLY
MOV [104],ES ; AND SEGMENT TOO
MOV AX,2509 ; REROUTE KEYB VECTOR CHAIN
MOV DX,106 ; TO POINT TO OUR CODE
INT 21 ; USING DOS
MOV DX,13C ; POINT TO END OF HANDLER
INT 27 ; TERMINATE, STAY RESIDENT
RCX
56
W
Q